{% load static %}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>退出登录</title>
    <meta name="description" content="">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="">
</head>

<body>
<div class="container-fluid">
    <div class="row sticky-top">
        <div class="col" style="padding: 0">
            <nav class="navbar navbar-expand-lg navbar-dark bg-success">
                <!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01"
            aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button> -->
                <div class="collapse navbar-collapse">
                    <a class="navbar-brand" href="{% url 'home:index' %}"><img src="{% static 'images/logo.png' %}"
                                                                               alt=""
                                                                               style="max-width: 15%;height:auto;"></a>
                    <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'home:home_history' %}">家乡历史</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'home:home_star' %}">家乡名人</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'home:home_beauty' %}">家乡美景</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'home:home_building' %}">家乡建筑</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'home:home_custom' %}">家乡风俗</a>
                        </li>
                    </ul>
                    <form class="form-inline my-2 my-lg-0">
                        <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
                        <button class="btn btn-outline-light my-2 my-sm-0" type="submit">搜索</button>
                    </form>
                </div>
            </nav>
        </div>
    </div>
    <!-- 注册成功 -->
{#    <div class="modal fade" id="register" tabindex="-100" role="dialog" aria-labelledby="registerLabel"#}
{#         aria-hidden="true">#}
{#        <div class="modal-dialog" role="document">#}
{#            <div class="modal-content">#}
{#                <div class="modal-header">#}
{#                    <h5 class="modal-title" id="registerLabel">注册成功</h5>#}
{#                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">#}
{#                        <span aria-hidden="true">&times;</span>#}
{#                    </button>#}
{#                </div>#}
{#                <div class="modal-body">#}
{#                    欢迎您的加入!#}
{#                </div>#}
{#                <div class="modal-footer">#}
{#                    <button type="button" class="btn btn-success btn-block"#}
{#                            onclick="window.location.href='{% url 'home:index' %}'">Let's go!#}
{#                    </button>#}
{#                </div>#}
{#            </div>#}
{#        </div>#}
{#    </div>#}
    <h5 class="page-header" style="margin-top: 20px"></h5>
    <div class="row">
        <div class="col">
            <div class="card mb-3">
                <div class="card-header">
                    <h2>创建账户</h2>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-7">
                            <form action="/register/" method="POST">
                                {% csrf_token %}
                                {% if register_form.captcha.errors %}
                                    <h5 class="page-header" style="margin-top: 20px"></h5>
                                    <div class="alert alert-warning alert-dismissible fade show" role="alert">
                                        <strong>{{ register_form.captcha.errors }}</strong>
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                {% elif message %}
                                    <h5 class="page-header" style="margin-top: 20px"></h5>
                                    <div class="alert alert-warning alert-dismissible fade show" role="alert">
                                        <strong>{{ message }}</strong>
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                {% endif %}
                                <h3 class="text-center">欢迎您的加入!</h3>
                                <h5 class="page-header" style="margin-top: 70px"></h5>
                                <div class="form-group">
                                    {{ register_form.username.label_tag }}
                                    {{ register_form.username }}
                                    <small class="form-text text-muted">
                                        用户名长度必须为2-18位,不能出现空格\特殊字符\表情
                                    </small>
                                </div>
                                <h5 class="page-header" style="margin-top: 45px"></h5>
                            <div class="form-group">
                                    {{ register_form.real_name.label_tag }}
                                    {{ register_form.real_name }}
                                    <small class="form-text text-muted">
                                        真实姓名是选填项目。如果提供，它可能用于署名您的贡献。
                                    </small>
                                </div>
                                <h5 class="page-header" style="margin-top: 45px"></h5>
                                <div class="form-group">
                                    {{ register_form.password.label_tag }}
                                    {{ register_form.password }}
                                    <small class="form-text text-muted">
                                        密码长度必须为6-18位, 包括大小写和数字, 不能出现空格\特殊字符\表情
                                    </small>
                                </div>
                                <h5 class="page-header" style="margin-top: 45px"></h5>
                                <div class="form-group">
                                    {{ register_form.password_confirm.label_tag }}
                                    {{ register_form.password_confirm }}
                                </div>
                                <h5 class="page-header" style="margin-top: 45px"></h5>
                                <div class="form-group">
                                    {{ register_form.email.label_tag }}
                                    {{ register_form.email }}
                                    <small class="form-text text-muted">
                                        电子邮件地址是选填项，但是当您忘记您的密码要重置密码时，需要该信息。
                                    </small>
                                </div>
                                <h5 class="page-header" style="margin-top: 45px"></h5>
                                <div class="form-group">
                                    {{ register_form.captcha.label_tag }}
                                    {{ register_form.captcha }}
                                    <small class="form-text text-muted">
                                        为防止机器人注册，请完成上方验证
                                    </small>
                                </div>
                                <h5 class="page-header" style="margin-top: 70px"></h5>
{#                                <button type="submit" class="btn btn-success btn-block btn-lg" data-toggle="modal"#}
{#                                        data-target="#register">创建您的账户#}
{#                                </button>#}
                            <button type="submit" class="btn btn-success btn-block btn-lg">创建您的账户
                                </button>
                            </form>
                        </div>
                        <div class="col-5">
                            <div class="jumbotron">
                                <h1 class="display-4">本站百科是由像您一样的人们构筑的。{{ request.session.is_register}}</h1>
                                <hr class="my-4">
                                <p class="lead">目前, 本站已有:</p>
                                <h1 class="display-4 text-center">{{ content_num }}</h1>
                                <p class="lead text-center">内容</p>
                                <h1 class="display-4 text-center">{{ count_item.discuss_num }}</h1>
                                <p class="lead text-center">讨论</p>
                                <h1 class="display-4 text-center">{{ count_item.editor_num }}</h1>
                                <p class="lead text-center">贡献者</p>
                                <p class="lead">
                                    <a class="btn btn-primary btn-lg" href="{% url 'home:index' %}"
                                       role="button">了解更多</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
            integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
    </script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
            integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
    </script>
    <script src="" async defer></script>
</body>

</html>